
const TokenKey = 'Token'

export function getToken() {
  return localStorage.getItem(TokenKey)
}

export function setToken(token) {
  return localStorage.setItem(TokenKey, token)
}

export function removeToken() {
  return localStorage.removeItem(TokenKey)
}


const UserInfoKey = 'UserInfo'

export function getUserInfo() {
    return localStorage.getItem(UserInfoKey) ? JSON.parse(localStorage.getItem(UserInfoKey)) : {}
}

export function setUserInfo(UserInfo) {
    return localStorage.setItem(UserInfoKey, JSON.stringify(UserInfo))
}

export function removeUserInfo() {
    return localStorage.removeItem(UserInfoKey)
}
